﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProductInputModel>" %>

<%@ Import Namespace="ChoViet.Lib.Helpers" %>
<%@ Import Namespace="ChoViet.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Sửa tin rao
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%if (ViewData["MessageInfo"] == null)
      { %>

    <script type="text/javascript">
        $(function() {
            $("#projectTabs").tabs();
        });
    </script>

    <% using (Html.BeginForm("Edit", "Product", FormMethod.Post, new
       {
           id = "adminForm",
           enctype = "multipart/form-data"
       }))
       {%>
    <%= Html.ValidationSummary(true)%>
    <div id="projectTabs">
        <ul>
            <li><a href="#projectTabs-1">Thông tin chi tiết</a></li>
            <li><a href="#projectTabs-2" id="googleTabs">Google Map</a></li>
            <li><a href="#projectTabs-3">Thuộc tính mở rộng</a></li>
            <li><a href="#projectTabs-4">Thông tin khác hàng</a></li>
        </ul>
        <div id="projectTabs-1">
            <table class="admintable" width="100%">
                <tbody>
                    <tr>
                        <td class="key">
                            Loại tin (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.DropDownListFor(m=>m.Product.TypeID, Model.ListType, "-- Loại tin --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Phân mục (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.DropDownListFor(m=>m.Product.CatID, new SelectList(Model.Categories,"ID","Name",Model.Product.CatID), "-- Chuyên mục --", new { @class = "title" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Tỉnh/Thành phố (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.DropDownListFor(m=>m.Product.CityID, Model.ListCity, "-- Tỉnh/Thành phố --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Quận/Huyện (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.DropDownListFor(m=>m.Product.DistrictID, Model.ListDistrict, "-- Quận/Huyện --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Dự án
                        </td>
                        <td>
                            <%=Html.DropDownListFor(m=>m.Product.ProjectID, Model.ListProject, "-- Dự án --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Tiêu đề (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Title, new { style = "width: 500px;", @class="required" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Địa chỉ (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Adress, new { style = "width: 500px;", @class="required" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Nội dung (<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.TextAreaFor(m=>m.Product.Summary, new { cols = 90, rows = 2 })%>
                        </td>
                    </tr>
<%--                    <tr>
                        <td class="key">
                            Mô tả
                        </td>
                        <td>
                            <%=Html.TextAreaFor(m=>m.Product.ProductContent, new { cols = 90, rows = 20 })%>
                        </td>
                    </tr>--%>
                    <tr>
                        <td class="key">
                            Ảnh đại diện
                        </td>
                        <td>
                            <input type="file" name="ImagePaths" id="ImagePaths" />
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Hướng nhà
                        </td>
                        <td>
                            <%=Html.DropDownList("Product.Direction",new SelectList(Model.listProductDirection,"Key","Value",Model.Product.Direction).ToList(),"-- Chọn hướng nhà --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Số tầng
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Floors, new { style = "width: 50px; text-align: center;" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Số phòng
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Rooms, new { style = "width: 50px; text-align: center;" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Giá(<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m =>m.Product.Cost, new { style = "width: 100px; text-align: center;", @class = "required" })%>
                            <%=Html.DropDownList("Product.CurrencyID", new SelectList(Model.ListCurrency, "Key ","Value ", Model.Product.CurrencyID).ToList())%>
                            <%=Html.DropDownList("Product.UnitCostID", new SelectList(Model.ListUnitCost, "Key", "Value", Model.Product.UnitCostID).ToList())%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Diện tích(<font color="red">*</font>)
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Area, new { style = "width: 100px; text-align: center;", @class = "required" })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Thứ tự ưu tiên
                        </td>
                        <td>
                            <%=Html.TextBoxFor(m=>m.Product.Priority, new { style = "width: 50px; text-align: center;"})%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Ngày hết hạn
                        </td>
                        <td>
                            <%=string.Format("{0:dd/MM/yyyy}",Model.Product.ExpireDate)%>: Gia hạn thêm:<%=Html.DropDownList("ExpireTime", new SelectList(Model.listProductExpire, "Key", "Value").ToList(), "--Chọn số ngày --")%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Trạng thái hiển thị
                        </td>
                        <td>
                            <%= Html.RadioButton("Product.PubYN", true, Model.Product.PubYN)%>
                            Đăng tin
                            <%= Html.RadioButton("Product.PubYN", false, !Model.Product.PubYN)%>
                            Không đăng
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Tin HOT
                        </td>
                        <td>
                            <%= Html.RadioButton("Product.HotYN", true, Model.Product.HotYN)%>
                            Tin HOT
                            <%= Html.RadioButton("Product.HotYN", false, !Model.Product.HotYN)%>
                            Tin không HOT
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Tin VIP
                        </td>
                        <td>
                            <%= Html.RadioButton("Product.VIPYN", true, Model.Product.VipYN)%>
                            Tin VIP
                            <%= Html.RadioButton("Product.VIPYN", false, !Model.Product.VipYN)%>
                            Tin không VIP
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Metadescription
                        </td>
                        <td>
                            <%=Html.TextAreaFor(m=>m.Product.MetaDescription, new { cols = 90, rows = 2 })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Metakeyword
                        </td>
                        <td>
                            <%=Html.TextAreaFor(m=>m.Product.MetaKeyword, new { cols = 90, rows = 2 })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Metatag
                        </td>
                        <td>
                            <%=Html.TextAreaFor(m=>m.Product.MetaTag, new { cols = 90, rows = 2 })%>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">
                            Ảnh
                        </td>
                        <td>
                            <table id="frmFile" width="100%" class="adminlist">
                                <tr>
                                    <th>
                                        Ảnh đính kèm:
                                    </th>
                                </tr>
                                <% if (Model.ListFile != null && Model.ListFile.Count() > 0)
                                   {%><tr>
                                       <td>
                                           <%
                                               foreach (string item in Model.ListFile)
                                               {%>
                                           <img width="110" height="75" style="border: 1px solid #CCCCCC;" class="bor_img" alt=""
                                               src="<%= string.Format("{0}{1}",Model.ImageRootUrl,item)%>" />
                                           <%}%>
                                       </td>
                                   </tr>
                                <%
                                    }%>
                                <tr>
                                    <td>
                                        <input id="fileInput1" size="25" name="fileInput1" type="file" onchange="check_extension(this.value,'btnSave');" />
                                        &nbsp;<input id="btnAddFile" type="button" value="Thêm" onclick="AddFile();" />
                                    </td>
                                </tr>
                            </table>

                            <script type="text/javascript">
                                var fileIndex = 1;
                                var hash = { '.jpg': 1, '.png': 1, '.gif': 1, '.doc': 1, '.docx': 1, '.xls': 1, '.xlsx': 1, '.zip': 1, '.rar': 1, '.ppt': 1, '.pptx': 1, '.txt:': 1 };
                                function check_extension(filename, submitId) {
                                    var re = /\..+$/;
                                    var ext = filename.match(re).toString().toLowerCase();
                                    var submitEl = document.getElementById(submitId);
                                    if (hash[ext]) {
                                        submitEl.disabled = false;
                                        return true;
                                    } else {
                                    }
                                };
                                function AddFile() {
                                    fileIndex++;
                                    var tag = "<td><input id='fileInput" + fileIndex.toString() + "' name='fileInput" + fileIndex.toString() + "' type=\"file\" size='25'  onchange=\"check_extension(this.value,'btnSave');\" /></td>";
                                    var row = "<tr>" + tag + "</tr>";
                                    $("#frmFile").append(row);
                                };
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="hidden" id="ProductAttributeValue" name="ProductAttributeValue" value="" />
                            <input type="hidden" id="Product.ImagePath" name="Product.ImagePath" value="<%= Model.Product.ImagePath %>" />
                            <input type="submit" id="btnSave" value="Lưu lại" onclick="return check_extension('ImagePaths','btnSave');" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="projectTabs-2">
            <div id="maps" onunload="GUnload()">
                <style type="text/css">
                    .map
                    {
                        width: 804px;
                        padding: 10px;
                        overflow: hidden;
                        margin-left: 60px;
                    }
                    .map img
                    {
                    }
                    .info
                    {
                        width: 804px;
                        overflow: hidden;
                    }
                    .infoL
                    {
                        float: left;
                        margin: 5px 0 0 0;
                        padding-top: 0px;
                    }
                    .infoL p
                    {
                        font: 12px Arial;
                        color: #0096db;
                        font-weight: bold;
                        margin-top: 0px;
                    }
                    .infoL .note
                    {
                        width: 483px;
                        padding: 7px;
                        height: 50px;
                        background-color: #e8e8e8;
                        overflow: hidden;
                        font: 12px Arial;
                        color: #000000;
                        font-weight: bold;
                        line-height: 16px;
                    }
                    .infoR
                    {
                        float: right;
                        margin: 20px 2px 0 0;
                    }
                    .button1
                    {
                        width: 63px;
                        height: 24px;
                        font: 12px Arial;
                        color: #000000;
                        font-weight: bold;
                        cursor: pointer;
                    }
                    .button2
                    {
                        width: 116px;
                        height: 24px;
                        font: 12px Arial;
                        color: #000000;
                        font-weight: bold;
                        cursor: pointer;
                    }
                </style>

                <script type="text/javascript">

                    $(document).ready(function() {
                        $("#googleTabs").click(function() {
                            initialize();
                            showAddress();
                        });
                    });
                    
                </script>

                <script src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true&amp;key=<%= Model.GoogleAPI %>"
                    type="text/javascript"></script>

                <script type="text/javascript">
                    var map = null;
                    var geocoder = null;

                    function initialize() {
                        if (GBrowserIsCompatible()) {
                            map = new GMap2(document.getElementById("map_canvas"));
                            map.setCenter(new GLatLng(21.033, 105.850), 15);
                            map.setUIToDefault();
                            geocoder = new GClientGeocoder();
                            var marker = new GMarker(new GLatLng(21.033, 105.850), { draggable: true });

                            //Draggable marker
                            GEvent.addListener(marker, "dragstart", function() {
                                map.closeInfoWindow();
                            });
                            GEvent.addListener(marker, "dragend", function() {

                                //marker.openInfoWindowHtml("aaaaa"+ marker.getLatLng());
                                document.getElementById("Product_Latitube").value = marker.getLatLng().lat();
                                document.getElementById("Product_Longitude").value = marker.getLatLng().lng();
                            });
                            map.addOverlay(marker);
                        }
                    }

                    function showAddress() {
                        var lat, lng;
                        lat = document.getElementById("Product_Latitube").value;
                        lng = document.getElementById("Product_Longitude").value;
                        if (lat == '' && lng == '' || lat == 0 && lng == 0) {
                            map.clearOverlays();
                            map.setCenter(new GLatLng(21.033, 105.850), 15);
                            var marker = new GMarker(new GLatLng(21.033, 105.850), { draggable: true });

                            document.getElementById("Product_Latitube").value = marker.getLatLng().lat();
                            document.getElementById("Product_Longitude").value = marker.getLatLng().lng();

                            //Draggable marker
                            GEvent.addListener(marker, "dragstart", function() {
                                map.closeInfoWindow();
                            });
                            GEvent.addListener(marker, "dragend", function() {
                                document.getElementById("Product_Latitube").value = marker.getLatLng().lat();
                                document.getElementById("Product_Longitude").value = marker.getLatLng().lng();
                            });
                            map.addOverlay(marker);
                        }
                        else {
                            map.clearOverlays();
                            map.setCenter(new GLatLng(lat, lng), 15);
                            var marker = new GMarker(new GLatLng(lat, lng), { draggable: true });

                            document.getElementById("Product_Latitube").value = marker.getLatLng().lat();
                            document.getElementById("Product_Longitude").value = marker.getLatLng().lng();

                            //Draggable marker
                            GEvent.addListener(marker, "dragstart", function() {
                                map.closeInfoWindow();
                            });
                            GEvent.addListener(marker, "dragend", function() {

                                //marker.openInfoWindowHtml("aaaaa"+ marker.getLatLng());
                                document.getElementById("Product_Latitube").value = marker.getLatLng().lat();
                                document.getElementById("Product_Longitude").value = marker.getLatLng().lng();
                            });
                            map.addOverlay(marker);
                        }
                    }
                    function LocationFinished() {
                        //window.opener.document.getElementById("latitude").value = document.getElementById("latitude").value;
                        alert(document.getElementById("Product_Latitube").value);
                        //window.opener.document.getElementById("longitude").value = document.getElementById("longitude").value;
                        document.getElementById("idHoanTat").style.display = "block";
                    }
                    function LocationFinishedClose() {
                        //window.opener.document.getElementById("Project_Latitude").value = document.getElementById("latitude").value;
                        //window.opener.document.getElementById("Project_Longitude").value = document.getElementById("longitude").value;
                        //window.close();
                    }
                </script>

                <div class="map">
                    <div id="map_canvas" style="width: 100%; height: 400px; padding-bottom: 10px; position: relative;">
                    </div>
                    <%= Html.HiddenFor(m=>m.Product.Longitude) %>
                    <%= Html.HiddenFor(m=>m.Product.Latitube) %>
                    <%--<input type="hidden" name="latitude" id="latitude" value="" />
                        <input type="hidden" name="longitude" id="longitude" value="" />--%>
                    <div class="info">
                        <div class="infoL">
                            <p style="display: none" id="idHoanTat">
                                <img src="../images/ico_map_check.gif" width="22" height="22" alt="" />&nbsp;Vị
                                trí tài sản đã được cập nhật !</p>
                            <div class="note">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="9%">
                                            <img src="/Images/map_quest.GIF" width="36" height="44" alt="" />
                                        </td>
                                        <td width="91%">
                                            Sử dụng con trỏ chuột di chuyển icon (<img src="/Images/map_ico.gif" width="12" height="16"
                                                alt="" />
                                            ) đến vị trí của tài sản trên bản đồ. Nhấn nút “Cập nhật vị trí” để cập nhật vị
                                            trí cho tài sản.
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="infoR">
                            <%--<input type="button" name="cmdFinish" class="button2" id="cmdFinish" value="Cập nhật vị trí"
                                    onclick="LocationFinished();" />&nbsp;
                                <input type="button" name="cmdClose" class="button1" id="cmdClose" value="Đóng lại"
                                    onclick="LocationFinishedClose();" />--%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="projectTabs-3">
            <table class="admintable">
                
               <%foreach (var itemAttribute in Model.ListProductAtribute)
                 { 
                     string testChecked="";
                     if (Model.ListProductAttributeID.Contains(itemAttribute.ID)) testChecked="checked";
                     %>
               <tr>
                    <td class="key"><%=itemAttribute.Name%> </td>
                    <td>
                        <input id="ProductAtribute.<%=itemAttribute.ID%>" name="ProductAtribute.<%=itemAttribute.ID%>" value="true" type="checkbox" <%=testChecked%>/>
                    </td>
               </tr>
                <%} %>       
            </table> 
            <div class="clear"></div>          
        </div>
        <div id ="projectTabs-4">
			<table class="admintable" width="100%">
				<tbody>
					<tr>
						<td class="key">
							Họ tên:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m => m.Product.ContactName,new {style = "width: 200px; height:20px;"})%>
						</td>
					</tr>				
					<tr>
						<td class="key">
							Địa chỉ:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=> m.Product.ContactAddress, new { style = "width: 300px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							Công ty:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=> m.Product.Company, new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							Email:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=> m.Product.ContactEmail, new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							Mobile:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=>m.Product.ContactMobile,new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							Yahoo:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=>m.Product.ContactYahoo, new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							MSN:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=>m.Product.ContactMSN, new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
					<tr>
						<td class="key">
							Skype:
						</td>
						<td style ="padding:5px;">
							<%=Html.TextBoxFor(m=>m.Product.ContactSkype,new { style = "width: 200px; height:20px;" })%>
						</td>
					</tr>
				</tbody>
			</table>
			<table class="admintable" width="100%">
                <tbody>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="submit" id="Submit1" value="Lưu lại" onclick="return check_extension('ImagePaths','btnSave');" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        
    </div>
    <%}
      } %>

    <script type="text/javascript" src="/Scripts/AjaxCommons.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#adminForm").validate();
        });

        var fileIndex = 1;
        var hash = { '.jpg': 1, '.png': 1, '.gif': 1, '.doc': 1, '.docx': 1, '.xls': 1, '.xlsx': 1, '.zip': 1, '.rar': 1, '.ppt': 1, '.pptx': 1, '.txt:': 1 };
        function check_extension(filename, submitId) {
            var re = /\..+$/;
            var ext = filename.match(re).toString().toLowerCase();
            var submitEl = document.getElementById(submitId);
            if (hash[ext]) {
                submitEl.disabled = false;
                return true;
            } else {
            }
        }
        tinyMCE.init({
            mode: "exact",
            elements: "Product_ProductContent",
            theme: "advanced",
            plugins: "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,paste,imagemanager",
            theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,cleanup,help,code,|,insertdate,inserttime,preview",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            paste_use_dialog: false,
            paste_auto_cleanup_on_paste: true,
            paste_convert_headers_to_strong: false,
            paste_strip_class_attributes: "all",
            paste_remove_spans: true,
            paste_remove_styles: true
        });
    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#Product_CityID").unbind("change").change(function() {
                var val = $("#Product_CityID").val();
                if (val == "" || val == '' || val == undefined)
                    return false;
                AjaxChange("#Product_CityID", "#Product_DistrictID", "/AjaxData/LoadDistrictByCity/");
            });

            $("#Product_DistrictID").unbind("change").change(function() {
                var val = $("#Product_DistrictID").val();
                if (val == "" || val == '' || val == undefined)
                    return false;
                AjaxChange("#Product_DistrictID", "#Product_ProjectID", "/AjaxData/LoadProjectByDistrict/");
            });

            $("#Product_TypeID").unbind("change").change(function() {
                var val = $("#Product_TypeID").val();
                if (val == "" || val == '' || val == undefined)
                    return false;
                AjaxChange("#Product_TypeID", "#Product_CatID", "/AjaxData/LoadCategoryByType/");
            });

            $("#OpenProductAttributeEx").unbind("click").click(function() {
                $("#OpenProductAttributeEx").css("display", "none");
                $("#productAttributeEx").css("display", "block");
            });
        });
    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#CityID").unbind("change").change(function() {
                $.ajax({
                    url: "/AjaxData/LoadDistrictByCity/" + $("#CityID").val(),
                    type: 'POST',
                    data: { CityID: $("#CityID").val() },
                    success: function(html) {
                        $("#errorAction").css("display", "none");
                        $("#DistrictID").html(html);
                    },
                    error: function(mes) {
                        $("#errorAction").css("display", "block");
                        $("#errorAction").html("Lỗi: " + mes.responseText);
                        return false;
                    }
                });
            });
        });

        function CheckAndUncheck(id) {
            $("tr td input[id='" + id + "']:checked").each(function() {
                var strParam = $("#ProductAttributeValue").val() + ";" + id;
                $("#ProductAttributeValue").val(strParam);
            });

            $("tr td input[id='" + id + "']:unchecked").each(function() {
                var paramContext = $("#ProductAttributeValue").val();
                paramContext = paramContext.replace(";" + id, "");
                $("#ProductAttributeValue").val(paramContext);
            });
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
    <td>
        <%= Html.Toolbar("Quay về", "/Product", "back") %>
    </td>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
    Sửa tin rao
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
